package top.healthylife.gateway.platform.tc.api.api;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.tc.api.util.TcHttpUtil;
import top.healthylife.gateway.platform.tc.dto.operatorstatus.req.TcReqOperatorCurrentStatusDto;
import top.healthylife.gateway.platform.tc.dto.operatorstatus.res.TcResOperatorCurrentStatusDto;

/**
 * @author GaoZeXi
 * @date 2021/7/20 13:19
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "运营商特征_当前状态_T",docUrl = "http://api.tcredit.com/norns/service/cas/doLogin" +
        "?service=http://api.tcredit.com/odin/user/sso", info = "根据输入的手机号码、身份证号、姓名三要素获取指定号码的当前状态 ，支持携转验证。")
public class TcOperatorCurrentStatusApi implements ParentFace<TcReqOperatorCurrentStatusDto, TcResOperatorCurrentStatusDto> {

    static final String URL = "http://api.ypcredit.com/mobile/cmcc/getState_t";

    @Override
    public TcResOperatorCurrentStatusDto execute(TcReqOperatorCurrentStatusDto dto) {
        return TcHttpUtil.getApiData(URL,dto,TcResOperatorCurrentStatusDto.class);
    }
}
